/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import React from 'react';
import { PageContainer } from '@ant-design/pro-layout';
import { Tabs } from 'antd';
import MiniAliappTable from '@/components/_pages/mini/aliapp';
import { useModel } from 'umi';

const Index: React.FC = () => {
  const { activeKey, setPageData } = useModel('mini_aliapp');

  const tabList = [
    {
      tab: '待审核',
      key: '1',
    },
    {
      tab: '审核中',
      key: '2',
    },
    {
      tab: '已通过',
      key: '4',
    },
    {
      tab: '未通过',
      key: '3',
    },
  ];

  const onChange = (val: string) => {
    setPageData({
      activeKey: val,
    });
  };

  return (
    <PageContainer title='支付宝驿站信息审核'>
      <Tabs activeKey={activeKey} onChange={onChange}>
        {tabList.map((item) => (
          <Tabs.TabPane tab={item.tab} key={item.key}>
            <MiniAliappTable type={item.key} activeKey={activeKey} />
          </Tabs.TabPane>
        ))}
      </Tabs>
    </PageContainer>
  );
};
export default Index;
